package com.example.test2.main.fragment;

import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.example.test2.R;
import com.example.test2.activity.SettingActivity;
import com.example.test2.databinding.FragmentMineBinding;
import com.example.test2.http.Constants;

// TODO: 2024/5/29 我的
public class MineFragment extends BaseFragment<FragmentMineBinding> implements View.OnClickListener {

    @Override
    protected void initData() {
        super.initData();
        getBinding().tvUname.setText(Constants.PHONE);
        getBinding().llSetting.setOnClickListener(this);
    }

    @Override
    protected int initLayout() {
        return R.layout.fragment_mine;
    }

    @Override
    protected FragmentMineBinding onCreateViewBinding(@NonNull LayoutInflater inflater, @Nullable ViewGroup parent) {
        return FragmentMineBinding.inflate(inflater, parent, false);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.ll_setting:
                startActivity(new Intent(getContext(), SettingActivity.class));
                break;
        }
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
    }
}